// 获取课表api
import axios from "axios";

export default function (courseType, semester, startWeek, endWeek) {
    return axios({
        method: "get",
        url: "/api/users/table",
        params: {
            courseType, semester, startWeek, endWeek
        },
        header: {
            Authorization: localStorage.getItem("Authorization")
        }
    }).then(response => {
        return {
            result: true,
            data: response.data
        }
    }).catch(error => {
        return {
            result: false,
            msg: error.response.data.msg
        }
    })
}